﻿@model Yamfinder.Web.Models.NewUserModel

@{
    Layout = null;
}



<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8" />
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

    <title>Yamfinder's First Run</title>
</head>
<body>
    <div>
        <h1>Welcome to Yamfinder</h1>

        <span>
            G'day and thankyou for choosing Yamfinder! As this is the first time Yamfinder has been run a Administrator account needs to be created. This Administrator account will be capable of access Yamfinder aswell as adding and removing other users.
        </span>

        @using (Html.BeginForm())
        {
            <span class="field-validation-error">
            @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
            </span>
            
            <div class="mainfield">
                <fieldset>
                    <legend><b>Username</b></legend>
                    <div>
                        @Html.LabelFor(m => m.Username)
                        @Html.TextBoxFor(m => m.Username, new { id = "usernameTextBox" })
                    </div>
                    <div class="field-validation-error">
                        @Html.ValidationMessageFor(m => m.Username)
                    </div>           
                </fieldset>
            </div>

            <div class="mainfield">
                <fieldset>
                    <legend><b>Password</b></legend>
                    Passwords are required to be a minimum of <b>@Membership.MinRequiredPasswordLength characters</b> in length.
                    <div>
                        @Html.LabelFor(m => m.Password)
                        @Html.PasswordFor(m => m.Password)
                    </div>
                    <div class="field-validation-error">
                        @Html.ValidationMessageFor(m => m.Password)
                    </div>
                    <div>
                        @Html.LabelFor(m => m.ConfirmPassword)
                        @Html.PasswordFor(m => m.ConfirmPassword)
                    </div>
                    <div class="field-validation-error">
                        @Html.ValidationMessageFor(m => m.ConfirmPassword)
                    </div>                      
                </fieldset>
            </div>
            
            <div class="mainfield">
                <fieldset>
                    <legend><b>Personal Details</b></legend>
                    <div>
                        @Html.LabelFor(m => m.Firstname)
                        @Html.TextBoxFor(m => m.Firstname)
                    </div>
                    <div class="field-validation-error">
                        @Html.ValidationMessageFor(m => m.Firstname)
                    </div>
                    <div>
                        @Html.LabelFor(m => m.Lastname)
                        @Html.TextBoxFor(m => m.Lastname)
                    </div>
                    <div class="field-validation-error">
                        @Html.ValidationMessageFor(m => m.Lastname)
                    </div>                 
                </fieldset>
            </div>
            
            <div class="mainfield">
                <div class="field">
                    <div class="large-button" align="center">
                        <input type="submit" value="FirstRun" />
                    </div>
                </div>
            </div>
        }        
    </div>
</body>
</html>
